1. Field of the Invention
The present invention relates to an image processing apparatus and a control method therefor.
2. Description of the Related Art
An image processing apparatus in which an input image is divided into a monochrome region (region of a monochrome image) and a color region (region of a color image) and γ correction is performed separately for the monochrome region and color region has been suggested. For example, an image processing apparatus has been suggested in which γ correction stipulated in digital imaging and communication in medicine (DICOM), Part 14 (referred to hereinbelow as “DICOM γ correction”) is implemented with respect to a monochrome region and γ correction with γ=2.2 (referred to hereinbelow as “2.2γ correction”) is implemented with respect to the color region has been suggested. Where such an image processing apparatus is used, when a monochrome image such as a Roentgen image and a color image such as an endoscope image are displayed, the DICOM γ correction is performed with respect to the monochrome image, the 2.2γ correction is performed with respect to the color image, and each image is displayed with adequate gradation.
A method for dividing an input image into a monochrome region and a color region is disclosed, for example, in Japanese Patent Application Publication No. 2003-244469. More specifically, Japanese Patent Application Publication No. 2003-244469 discloses a method by which an input image is divided into a plurality of rectangular blocks and it is determined whether a monochrome region or a color region is present in each rectangular block.
The following issues should be taken into account when determining the presence of monochrome regions and color regions.
A certain number of color pixels, such as color annotation, can be present in a monochrome image (for example, a Roentgen image. However, even though the color pixels are included, the monochrome image should be displayed by implementing the DICOM γ correction. Therefore, when the monochrome region is determined, such a region should be determined as a monochrome region even when a certain number of color pixels are present therein.
However, when the technique disclosed in Japanese Patent Application Publication No. 2003-244469 is used by taking the aforementioned issue into account, the following tradeoff situation sometimes occurs. Thus, where either of the monochrome region and color region is determined correctly, the other one is determined erroneously.
This tradeoff will be explained below with reference to FIGS. 12A to 12D. FIG. 12A shows an example of an input image. A “color region A” is a rectangular block of a color image (endoscope image) and should be determined as a color region. A “monochrome region B” is a rectangular block of a monochrome image (Roentgen image) and should be determined as a monochrome image. FIG. 12B is an enlarged view of the color region A shown in FIG. 12A. FIG. 12C is an enlarged view of the monochrome region B shown in FIG. 12A.
In the color region A and the monochrome region B, the ratio of the number of color pixels to the total number of pixels in a rectangular block is substantially the same. Therefore, when the presence of the monochrome region or color region is determined for each rectangular block with respect to the image shown in FIG. 12A, the same determination result is obtained from the color region A and the monochrome region B. Thus, where the color region A is correctly determined as a color region, the monochrome region B is erroneously determined as a color region, and where the monochrome region B is correctly determined as a monochrome region, the color region A is erroneously determined as a monochrome region. In FIG. 12D, a zone that is determined as a color region when the monochrome region B is correctly determined as a monochrome region is shown by oblique hatching.